import request from '@/utils/request'
import store from '@/store'
export const login = data => {
  return request({
    url: '/v1_0/authorizations',
    method: 'post',
    data: data
  })
}
export const userapi = () => {
  return request({
    url: '/v1_0/user/profile'
    // headers: {
    //   Authorization: 'Bearer ' + store.state.tokenobj.token
    // }
  })
}
// 获取修改日期的请求
export const editinfo = data => {
  return request({
    url: '/v1_0/user/profile',
    method: 'patch',
    data: data
  })
}
// 封装修改用户头像的函数
export const editphoto = data => {
  return request({
    url: '/v1_0/user/photo',
    method: 'patch',
    data: data
  })
}
